package cms.rbac.dao;

import cms.rbac.entity.Role;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


@Repository
public interface AuthAssignmentDao {
    boolean add(@Param("itemName") String itemName, @Param("userId") int userId, @Param("createAt") long createAt);

    boolean delete(@Param("userId") int userId, @Param("itemName") String itemName);

    boolean deleteByUserId(@Param("userId") int userId);

    Role[] findRolesByUserId(@Param("userId") int userId);

    String[] findRolesNameByUserId(@Param("userId") int userId);

    String[] findPermissionsNameByUserId(@Param("userId") int userId);
}
